const Koa = require("koa");
const app = new Koa();
app.use((ctx) => {
  if (ctx.url == "/") {
    ctx.body == "index";
  } else if (ctx.url == "/news") {
    ctx.body = "news page";
  }

  /*   const method = ctx.method.toLocaleLowerCase();
  if (method == "get") {
    ctx.body = "get  展示列表";
  } else if (method == "post") {
    ctx.body = "post  添加列表";
  } */
});

app.listen(3000, () => {
  console.log("3000 running");
});
